package org.leetcode.middle.leetcode6;

public class Solution
{
    public String convert(String s, int numRows) {

        String str1=null;
        String str2=null;
        String str3=null;


        int time = s.length()/4+1;

        for (int i = 0; i < time; i++) {

            str1=str1+s.charAt(i);
            str2=str2+s.charAt(i+1)+s.charAt(i+3);
            str3=str3+s.charAt(i+2);

        }


        return str1+str2+str3;
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        String s ="PAYPALISHIRING";
        String convert = solution.convert(s, 3);
        System.out.println(convert);
    }

    }
